package bridge;

/**
 * @author dongtao
 * @desc
 * @Data 2021-08-16
 */
public class Client {
    public static void main(String[] args) {
        Abstraction abstraction1 = new RefinedAbstraction1();
        Abstraction abstraction2 = new RefinedAbstraction2();
        
        Implementor implementor1 = new ConcreteImplementation1();
        Implementor implementor2 = new ConcreteImplementation2();
        
        // 三角形红色
        abstraction1.setImplementor(implementor1);
        abstraction1.draw();
        
        // 三角形蓝色
        abstraction1.setImplementor(implementor2);
        abstraction1.draw();
        
        // 正方形红色
        abstraction2.setImplementor(implementor1);
        abstraction2.draw();
        
        // 正方形蓝色
        abstraction2.setImplementor(implementor2);
        abstraction2.draw();
        
    }
}
